package com.yyaccp.appinfo.controller;

import com.yyaccp.appinfo.utils.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @author 天天向上 （john.yi@qq.com）
 * @date 2020/11/25.
 */
@RestController
public class LogoutController {
    @GetMapping("/api/logout")
    public AjaxResult logout(HttpSession session) {
        session.invalidate();
        return AjaxResult.success("注销成功");
    }
}
